<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/temp.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>temp</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
</head>

<body>
<table width="636" border="0">
  <tr>
  <td width="221"><a href="index.php">HOME PAGE </a></td>
    <td width="77"><a href="index.php">User Login</a> </td>
	<td width="114"><a href="superUserLogin.php">Super User Login</a> </td>
    <td width="93"><a href="managerLogin.php">Manager Login</a> </td>
    <td width="109"><a href="adminLogin.php">Adminster Login</a> </td>
  </tr>
</table>
<!-- InstanceBeginEditable name="EditRegion" -->
<table width="656" border="1">
  <tr>
    <td width="582" rowspan="4"><table width="557" height="54" border="1">
      <tr>
        <td width="56" height="18">Manager Name</td>
        <td width="28">ID</td>
        <td width="39">Phone</td>
        <td width="38">&nbsp;</td>
        <td width="31">&nbsp;</td>
        <td width="52">&nbsp;</td>
        <td width="267">&nbsp;</td>
      </tr>
      <?PHP
   while($array){
      $itemid = $array['itemid'];
      $itemname = $array['itemname'];
      $detail = $array['details'];
      $startdate = $array['itemstartdate'];
      $enddate = $array['itemenddate'];
	  $maxprice = $array['itemprice'];
	  $timenow = date("Y-m-d H:i:s");
	  if($timenow < $startdate){$enddate ="NOT START!";}
	  if($enddate < $timenow){$enddate ="FINISH!";$startdate ="FINISH!";}
	  
   $c = mysql_query("select max(price) from maxprice where itemid=$itemid;");
   $arrayt = mysql_fetch_array($c);
	  $userprice =  $arrayt['max(price)'];
      echo ("<tr><td>" .$itemid ."</td><td>" .$itemname ."</td><td>" .$startdate ."</td><td>" .$enddate ."</td><td>" .$detail ."</td><td>" .$maxprice.'$' ."</td><td>" .$userprice.'$' ."</td></tr>");
      $array = mysql_fetch_array($b);
   }
?>
    </table></td>
    <td width="58"><form id="form1" name="form1" method="post" action="addManager.php">
      <input type="submit" name="Submit" value="Add" />
    </form></td>
  </tr>
  <tr>
    <td><form id="form2" name="form2" method="post" action="DeleteManager.php">
      <input type="submit" name="Submit2" value="Delete" />
    </form></td>
  </tr>
  <tr>
    <td><form id="form3" name="form3" method="post" action="">
      <input type="submit" name="Submit3" value="Edit" />
    </form></td>
  </tr>
  <tr>
    <td><form id="form4" name="form4" method="post" action="">
      <input type="submit" name="Submit4" value="Exit" />
    </form></td>
  </tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<!-- InstanceEndEditable -->
footer
</body>
<!-- InstanceEnd --></html>
